package day03;

import java.text.SimpleDateFormat;
import java.util.Calendar;
import java.util.Date;
import java.util.GregorianCalendar;

public class Demo10 {

	public static void main(String[] args) {
		Calendar c=new GregorianCalendar();
		System.out.println(c.getTime());
		
		c.set(Calendar.YEAR, 10000);
		c.set(Calendar.MONTH, Calendar.FEBRUARY);
		c.set(Calendar.DATE, 22);
		c.set(Calendar.MILLISECOND,-1000*5);
		Date date=c.getTime();
		SimpleDateFormat sdf=
				new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
		String s=sdf.format(date);
		System.out.println(s);
	}

}
